/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jlibrarian.interfaces;

import java.util.Collection;
import jlibrarian.entities.Customer;

/**
 *
 * @author MantaEx
 */
public interface CustomerManager 
{
    /**
     * This method creates new Customer in DB.
     * @param customer Customer to create.
     */
    Customer createCustomer(Customer customer);
    
    /**
     * This method deletes customer from DB.
     * @param customer Customer to delete.
     */
    boolean deleteCustomer(Customer customer);
    
    /**
     * This method replace current entry with new one.
     * @param customer Customer to update.
     */
    boolean updateCustomer(Customer customer);
    
    /**
     * This method returns customer with given id.
     * @param id ID representing customer in system.
     * @return returns customer with given id.
     */
    Customer findCustomerById(int id);

    /**
     * This method returns customers with selected names. You can use %.
     * @param firstName First name of the customer
     * @param surname Surname of the customer
     * @return returns customers
     */
    Collection<Customer> findCustomerByNames(String firstName, String surname);
    
    /**
     * This method returns all customers.
     * @return returns customers.
     */
    Collection<Customer> getAllCustomers();
}
